package com.sl.plugin.step.selenium.form;

import com.sl.core.engine.data.ProcessCompContextService;
import com.sl.core.engine.meta.ProcessCompDescriptorService;
import com.sl.core.engine.meta.impl.AbstractProcessCompDescriptor;
import com.sl.core.engine.meta.row.ProcessRowDescriptor;
import com.sl.core.engine.step.ProcessCompService;
import lombok.Getter;
import org.openqa.selenium.WebDriver;

import java.util.Map;

/**
 */
@Getter
public class SeleniumFormCompCompDescriptor extends AbstractProcessCompDescriptor<
        SeleniumFormComp,SeleniumFormCompContext> implements ProcessCompDescriptorService {


//    @Override
//    protected ProcessCompService getComp() {
//        return new SeleniumFormComp(this);
//    }
//
//
//
//    @Override
//    public ProcessCompContextService getContext() {
//        return new SeleniumFormCompContext();
//    }
//
    @Override
    public void loadDescriptor(Map<String, Object> map) {
        excludeSerializableClass.add(WebDriver.class);
    }


    @Override
    public ProcessRowDescriptor getResultDescriptor(ProcessRowDescriptor processRowDescriptor) {
        processRowDescriptor.clear();
        processRowDescriptor.addObj("webDriver");
        return processRowDescriptor;
    }
}
